﻿@typeparam TValue
@inherits CheckboxInputBase<TValue>

<div class=@ClassNames("relative flex items-start", CssClass())>
    <div class="flex items-center h-5">
        <input type="checkbox" 
                class="focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded" 
                id=@Id 
                name=@Id 
                @bind="CurrentValueAsBool" 
                @attributes="IncludeAttributes">
    </div>
    <div class="ml-3 text-sm">
        <label class=@ClassNames("font-medium text-gray-700") for=@Id> 
            @UseLabel
        </label>
        
    @if (HasErrorField)
    {
        <p class=@ClassNames("text-gray-500")>@ErrorFieldMessage</p>
    }
    else if (!string.IsNullOrEmpty(UseHelp))
    {
        <p id=@($"{Id}-description") class="text-gray-500">@UseHelp</p>
    }

    </div>
</div>

